<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <a href="#/product">产品</a>
</body>
<script src="./node_modules/vue/dist/vue.js"></script>
<script src="./node_modules/vue-router/dist/vue-router.js"></script>
<script>
    window.onpopstate=function(event){
        alert(
            "location"+
                document.lcoation+
                    ",state:"+
                    JSON.stringify(event.state)
        );
    };
    history.pushState({page:1},"title 1","?page=1");
    history.pushState({page:2},"title 2","?page=2");
    history.replaceState({page:3},"title 3","?page=3");
    history.back();
    history.back();
    history.go(2);
</script>
</html>